package com.liiy.missyou.reflect;


public class HeroFactory {
    public static ISkill getHero(String name) throws Exception {
        String class_str = "com.liiy.missyou.reflect.hero." + name;
        Class <?> cla = Class.forName(class_str);
        Object obj = cla.getDeclaredConstructor().newInstance();

        return (ISkill)obj;
    }
}
